package router

import (
	"github.com/gin-gonic/gin"
	"lab.com/controller"
)

// 轮播图接口
func initBannerRouter(e *gin.Engine) {

	bannerControl := controller.Banner
	bannerRouter := e.Group("/banner")

	// 所有用户可查看，展示在官网首页上面
	bannerRouter.GET("list", bannerControl.List)

	// 管理员，对轮播图进行管理
	bannerRouter.POST("/manage/add", bannerControl.Add)
	bannerRouter.GET("manage/delete", bannerControl.Delete)
	bannerRouter.POST("manage/edit", bannerControl.Edit)
	bannerRouter.GET("manage/show", bannerControl.Show)
	bannerRouter.GET("manage/list", bannerControl.ListInManage)
}
